#include "bomb.h"
#include "config.h"
Bomb::Bomb()
{
    for(int i=1;i<=BOMBMAX;i++)
    {
        QString str=QString(BOMBPATH).arg(i);
        m_pixArr.push_back(QPixmap(str));
    }

    m_x=0;
    m_y=0;
    m_Free=true;
    m_index=0;
    m_Recorder=0;
}

void Bomb::updateInfo()
{
    if(m_Free)
    {
        return;
    }

    m_Recorder++;
    if(m_Recorder<BOMB_INTERVAL)
    {
        return;
    }

    m_Recorder=0;
    m_index++;
    if(m_index>BOMBMAX-1)
    {
        m_index=0;
        m_Free=true;
    }
}
